package com.javafamily.service;

import com.javafamily.bean.Pets;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

// 指定当前为Feign客户端，参数是提供者微服务名称
@FeignClient("familycloud-provider-depart")
@RequestMapping("/pets")
public interface PetService {
    @PostMapping("/save")
    boolean savePets(@RequestBody Pets pets);

    @DeleteMapping("/del/{id}")
    boolean removePetsById(@PathVariable("id") Integer id);

    @PutMapping("/update")
    boolean modifyPets(@RequestBody Pets pets);

    @GetMapping("/get/{id}")
    Pets getPetsById(@PathVariable("id") Integer id);

    @GetMapping("/list")
    List<Pets> listAllPets();

    @GetMapping("/findPetsByIdOrName")
    List<Pets> findPetsByIdOrName(@RequestBody Pets pets);
}


